const {UserManage} = require('../../database');

module.exports = (req, res) => {
    UserManage.find((err, data) => {
        if(err) return res.status(500).json({
            code: 500,
            msg: '服务端错误'
        })

        res.render('user/list.html', {
            userList: data,
            user: req.session.user
        });
    })
}